package com.zjc.springboot.nettyclient.task;

import com.zjc.springboot.nettyclient.client.NettyClient;

public class TerminalSendGpsThread extends Thread {
    NettyClient nettyClient;

    public TerminalSendGpsThread(NettyClient nettyClient) {
        this.nettyClient = nettyClient;
    }

    @Override
    public void run() {
        while (true) {
            try {
                sleep(nettyClient.getConfig().getTimeInterval());
                nettyClient.sendPositionMessage();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

}
